
package com.cuit.springboot.util;

public class MyException extends Exception {

	private static final long serialVersionUID = 1L;
	
	int errorCode=1;
	Object object=null;
	
    public MyException() {
	super();
    }	

	public MyException(String message) {
		super(message);
    }
    
    public MyException(int errorCode,String message) {
    	super(message);
    	this.errorCode=errorCode;
    }
    public MyException(int errorCode,String message,Object object) {
    	super(message);
    	this.errorCode=errorCode;
    	this.object=object;
    }
    
    public MyException(String message, Throwable cause) {
        super(message, cause);
    }

    public MyException(Throwable cause) {
        super(cause);
    }
    
    public int getErrorCode() {
		return this.errorCode;
	}
    
    public Object getObject() {
		return object;
	}
    
    public void setObject(Object object) {
		this.object = object;
	}
    
    public static  MyException createByILLEGAL_ARGUMENT(){
        return new MyException(ResponseCode.ILLEGAL_ARGUMENT.getStatus(),ResponseCode.ILLEGAL_ARGUMENT.getInfo());
    }
    
}
